<?php

namespace app\api\model\vip;

use app\logic\model\vip\VipLogicModel;

class VipApiModel extends VipLogicModel
{

    public function getApiList(array $param,$where=[],$filed="*",$order="sort desc,id desc"){
        $query = $this->where($where)
            ->field($filed)
            ->where(function($q) use ($param){
                if(check_request($param,'status')){
                    $q->where('status',1);
                }
            })->order($order);
        $count = $query->count();
        $list = $query->select();
        return [$list,$count];
    }
}